// Decompiled by GOOSIN CO,LTD Copyright 2010 Pavel Kouznetsov.
// home page: http://www.Goosin.net
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   getYearProfitSumFromItemb.java

package finance;

import include.nseer_db.nseer_db;
import java.sql.ResultSet;

public class getYearProfitSumFromItemb
{

	public getYearProfitSumFromItemb()
	{
	}

	public double getYearProfitSumFromItemb(nseer_db db, String field_name, String account_period)
	{
		double itemd_sum = 0.0D;
		try
		{
			String sql = (new StringBuilder("select ")).append(field_name).append(" from finance_report_02 where account_period='").append(account_period).append("' order by id desc").toString();
			ResultSet rs = db.executeQuery(sql);
			if (rs.next())
				itemd_sum = rs.getDouble(field_name);
		}
		catch (Exception ex)
		{
			ex.printStackTrace();
		}
		return itemd_sum;
	}
}
